#include "d_Math.h"
#include <GL/gl.h>

using namespace d_Math;

d_NormalCone::d_NormalCone(d_Vec3f origin, d_Vec3f normal, float r, float d)
{
	this->origin = origin;
	this->normal = normal;
	this->r = r;
	this->d = d;
	last_test_passed = true;
}

void d_NormalCone::draw()
{
	d_Plane *tmp = new d_Plane(origin+normal*d, normal);
	glBegin(GL_LINES);
		glColor3f(1,1,1);
		glVertex3fv(origin.p);
		glColor3f(.2,.2,.2);
		glVertex3fv((origin+normal*d).p);
	glEnd();
	tmp->drawCircle(r);
}

